<?php
require_once("lib/util.php");
require_once("lib/db.php");
connect();
$incidents= get_recent_incidents();
render("index_gunk", array("incidents" => $incidents));
close();

function get_recent_incidents() {
	$incident_query= "SELECT * FROM incidents ORDER BY created DESC LIMIT 3"; 
	$incident = query ($incident_query, array());
	return $incident ;
}


